package 多线程.多线程创建.MyCallAble;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class Test01 {

    public static void main(String[] args) throws ExecutionException, InterruptedException {
        MyCallable myCallable = new MyCallable();
        FutureTask<String> stringFutureTask = new FutureTask<>(myCallable);

        new Thread(stringFutureTask).start();

        String s = stringFutureTask.get();
        System.out.println(s);
    }
}
